-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat(patients): escape string in appointments search #2031
Conversation
Reason field on new appointment screen no longer a required field. Line 21, Label element now takes isRequired attr from interface Props. fix HospitalRun#1997
Previously added a listing for yarn in the dependencies in package.json. This commit undoes that. re |
Added a test case to test if the Label receives the isRequired prop on required fields re HospitalRun#2003
Changed const expectedValue to const expectedRequired, named for prop isRequired re HospitalRun#2003
Added a step to take the search string and remove all non-letter/whitespace characters. Line 16 and 22 fix HospitalRun#1999
Added a step to remove all non-alphabetical and whitespace characters from search string regex fix HospitalRun#1999
Removed special chars that interfered with RegExp in search strings re HospitalRun#1999
Added a test to pass a search string including all prohibited chars, expects cleaned version of string to be used for search. re HospitalRun#1999
Added test on the search string cleaning regex; runs search string containing all prohibited chars, expects cleaned version to be searched and matched re HospitalRun#1999
Removing mocha listed dependency added in error re HospitalRun#1999
Added escapeStringRegexp package to escape special chars in search string for p fix HospitalRun#1999
Updating forked repo from main
Added escapeStringRegexp to AppointmentRepository.ts to escape regex chars in appointment search feild in patient info area. fix HospitalRun#2029
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/hospitalrun/hospitalrun-frontend/3j5bwqc1w |
I tried resetting my local repo and then making the changes again, as my master branch was out of sync with the master repo and things were getting untidy. Looks like I still managed to send multiple commits. :| If anyone could give me an idea of how to submit a PR without having my previous 43 commits linked to it, I'd be very grateful! |
Without knowing the exact state of your local branch, it's hard to say. However, likely you'll need to ensure that your local master branch is up to date with the upstream master branch (see: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork). Once your local master branch is up to date, then you can update your local branch so its up to date with your local master branch. |
@jackcmeyer - thanks, I'll give that another go, then. I must have made an error somewhere in the process the first time. |
Fixes #2029 .
Changes proposed in this pull request:
Added escapeStringRegex method to search text when searching appointments from the patient info area: AppointmentRepository.ts
Added test suite to AppointmentRepository.ts.tsx to check the functionality of change.